package com.bingo.demo.DAO;

import com.bingo.demo.pojo.Essay;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface EssayMapper {

    List<Essay> findAll();

    Essay findById(Integer id);

    List<Essay> findByUserId(Integer userId);

    List<Essay> findByAuthority(Integer authority);

    List<Essay> findByTitle(String title);

    Essay findByNumber(String number);

    void deleteEssayById(Integer id);

    void addEssay(Essay essay);

}
